<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.9.1"/>
<title>IDA SDK: Process commands</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">IDA SDK
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.9.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="files.html"><span>Header&#160;Files</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#groups">Modules</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Process commands<div class="ingroups"><a class="el" href="group__dbg__funcs.html">Debugger functions</a></div></div>  </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>Use these functions to manipulate the debugged process. </p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="groups"></a>
Modules</h2></td></tr>
<tr class="memitem:group___d_s_t_a_t_e__"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___d_s_t_a_t_e__.html">Debugged process states</a></td></tr>
<tr class="memdesc:group___d_s_t_a_t_e__"><td class="mdescLeft">&#160;</td><td class="mdescRight">See <a class="el" href="group__dbg__funcs__cmds.html#ga610fa89b8ec6db08d7f7d3aabcf69a2f" title="Return the state of the currently debugged process. ">get_process_state()</a>, <a class="el" href="group__dbg__funcs__cmds.html#ga626126369d3b58b3d5eeaa953c936988" title="Set new state for the debugged process. ">set_process_state()</a>, <a class="el" href="group__dbg__funcs__cmds.html#ga01e494031d20479e64771af94a7f7f61" title="Invalidate cached debugger information. ">invalidate_dbg_state()</a> <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:group___d_b_g_i_n_v__"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___d_b_g_i_n_v__.html">Debugged process invalidation options</a></td></tr>
<tr class="memdesc:group___d_b_g_i_n_v__"><td class="mdescLeft">&#160;</td><td class="mdescRight">See <a class="el" href="group__dbg__funcs__cmds.html#ga626126369d3b58b3d5eeaa953c936988" title="Set new state for the debugged process. ">set_process_state()</a> and <a class="el" href="group__dbg__funcs__cmds.html#ga01e494031d20479e64771af94a7f7f61" title="Invalidate cached debugger information. ">invalidate_dbg_state()</a> <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga610fa89b8ec6db08d7f7d3aabcf69a2f"><td class="memItemLeft" align="right" valign="top">int <a class="el" href="pro_8h.html#a6505e7ff3b129d8b17258304886fd133">idaapi</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbg__funcs__cmds.html#ga610fa89b8ec6db08d7f7d3aabcf69a2f">get_process_state</a> (void)</td></tr>
<tr class="memdesc:ga610fa89b8ec6db08d7f7d3aabcf69a2f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the state of the currently debugged process.  <a href="#ga610fa89b8ec6db08d7f7d3aabcf69a2f">More...</a><br /></td></tr>
<tr class="separator:ga610fa89b8ec6db08d7f7d3aabcf69a2f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga626126369d3b58b3d5eeaa953c936988"><td class="memItemLeft" align="right" valign="top">int <a class="el" href="pro_8h.html#a6505e7ff3b129d8b17258304886fd133">idaapi</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbg__funcs__cmds.html#ga626126369d3b58b3d5eeaa953c936988">set_process_state</a> (int newstate, <a class="el" href="idd_8hpp.html#a479b4266d280e0d77b7ca914dec19122">thid_t</a> *p_thid, int dbginv)</td></tr>
<tr class="memdesc:ga626126369d3b58b3d5eeaa953c936988"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set new state for the debugged process.  <a href="#ga626126369d3b58b3d5eeaa953c936988">More...</a><br /></td></tr>
<tr class="separator:ga626126369d3b58b3d5eeaa953c936988"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga01e494031d20479e64771af94a7f7f61"><td class="memItemLeft" align="right" valign="top">int <a class="el" href="pro_8h.html#a6505e7ff3b129d8b17258304886fd133">idaapi</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbg__funcs__cmds.html#ga01e494031d20479e64771af94a7f7f61">invalidate_dbg_state</a> (int dbginv)</td></tr>
<tr class="memdesc:ga01e494031d20479e64771af94a7f7f61"><td class="mdescLeft">&#160;</td><td class="mdescRight">Invalidate cached debugger information.  <a href="#ga01e494031d20479e64771af94a7f7f61">More...</a><br /></td></tr>
<tr class="separator:ga01e494031d20479e64771af94a7f7f61"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae5e88efeab714519f8424aef6034c50d"><td class="memItemLeft" align="right" valign="top">int <a class="el" href="pro_8h.html#a6505e7ff3b129d8b17258304886fd133">idaapi</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbg__funcs__cmds.html#gae5e88efeab714519f8424aef6034c50d">start_process</a> (const char *path=NULL, const char *args=NULL, const char *sdir=NULL)</td></tr>
<tr class="memdesc:gae5e88efeab714519f8424aef6034c50d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Start a process in the debugger.  <a href="#gae5e88efeab714519f8424aef6034c50d">More...</a><br /></td></tr>
<tr class="separator:gae5e88efeab714519f8424aef6034c50d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga6ebf673c9bd783f10aa58dcccbe0ec68"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga6ebf673c9bd783f10aa58dcccbe0ec68"></a>
int <a class="el" href="pro_8h.html#a6505e7ff3b129d8b17258304886fd133">idaapi</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbg__funcs__cmds.html#ga6ebf673c9bd783f10aa58dcccbe0ec68">request_start_process</a> (const char *path=NULL, const char *args=NULL, const char *sdir=NULL)</td></tr>
<tr class="memdesc:ga6ebf673c9bd783f10aa58dcccbe0ec68"><td class="mdescLeft">&#160;</td><td class="mdescRight">Post a <a class="el" href="group__dbg__funcs__cmds.html#gae5e88efeab714519f8424aef6034c50d" title="Start a process in the debugger. ">start_process()</a> request. <br /></td></tr>
<tr class="separator:ga6ebf673c9bd783f10aa58dcccbe0ec68"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gafde4e91a01fb308d4418512ccb369637"><td class="memItemLeft" align="right" valign="top">bool <a class="el" href="pro_8h.html#a6505e7ff3b129d8b17258304886fd133">idaapi</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbg__funcs__cmds.html#gafde4e91a01fb308d4418512ccb369637">suspend_process</a> (void)</td></tr>
<tr class="memdesc:gafde4e91a01fb308d4418512ccb369637"><td class="mdescLeft">&#160;</td><td class="mdescRight">Suspend the process in the debugger.  <a href="#gafde4e91a01fb308d4418512ccb369637">More...</a><br /></td></tr>
<tr class="separator:gafde4e91a01fb308d4418512ccb369637"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga17e3941d0bb55d22c230d16a9ff155de"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga17e3941d0bb55d22c230d16a9ff155de"></a>
bool <a class="el" href="pro_8h.html#a6505e7ff3b129d8b17258304886fd133">idaapi</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbg__funcs__cmds.html#ga17e3941d0bb55d22c230d16a9ff155de">request_suspend_process</a> (void)</td></tr>
<tr class="memdesc:ga17e3941d0bb55d22c230d16a9ff155de"><td class="mdescLeft">&#160;</td><td class="mdescRight">Post a <a class="el" href="group__dbg__funcs__cmds.html#gafde4e91a01fb308d4418512ccb369637" title="Suspend the process in the debugger. ">suspend_process()</a> request. <br /></td></tr>
<tr class="separator:ga17e3941d0bb55d22c230d16a9ff155de"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga8833a43919fac27965ef862bbc2b5073"><td class="memItemLeft" align="right" valign="top">bool <a class="el" href="pro_8h.html#a6505e7ff3b129d8b17258304886fd133">idaapi</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbg__funcs__cmds.html#ga8833a43919fac27965ef862bbc2b5073">continue_process</a> (void)</td></tr>
<tr class="memdesc:ga8833a43919fac27965ef862bbc2b5073"><td class="mdescLeft">&#160;</td><td class="mdescRight">Continue the execution of the process in the debugger.  <a href="#ga8833a43919fac27965ef862bbc2b5073">More...</a><br /></td></tr>
<tr class="separator:ga8833a43919fac27965ef862bbc2b5073"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga32a8ecb2f27d1ce7a88278cf2aaa5d8f"><td class="memItemLeft" align="right" valign="top">bool <a class="el" href="pro_8h.html#a6505e7ff3b129d8b17258304886fd133">idaapi</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbg__funcs__cmds.html#ga32a8ecb2f27d1ce7a88278cf2aaa5d8f">request_continue_process</a> (void)</td></tr>
<tr class="memdesc:ga32a8ecb2f27d1ce7a88278cf2aaa5d8f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Post a <a class="el" href="group__dbg__funcs__cmds.html#ga8833a43919fac27965ef862bbc2b5073" title="Continue the execution of the process in the debugger. ">continue_process()</a> request.  <a href="#ga32a8ecb2f27d1ce7a88278cf2aaa5d8f">More...</a><br /></td></tr>
<tr class="separator:ga32a8ecb2f27d1ce7a88278cf2aaa5d8f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga2aaee8c71618ffef3f2562599b314316"><td class="memItemLeft" align="right" valign="top">bool <a class="el" href="pro_8h.html#a6505e7ff3b129d8b17258304886fd133">idaapi</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbg__funcs__cmds.html#ga2aaee8c71618ffef3f2562599b314316">exit_process</a> (void)</td></tr>
<tr class="memdesc:ga2aaee8c71618ffef3f2562599b314316"><td class="mdescLeft">&#160;</td><td class="mdescRight">Terminate the debugging of the current process.  <a href="#ga2aaee8c71618ffef3f2562599b314316">More...</a><br /></td></tr>
<tr class="separator:ga2aaee8c71618ffef3f2562599b314316"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga0dc2ef1fb91eeffdab5cf938f0d40d1e"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga0dc2ef1fb91eeffdab5cf938f0d40d1e"></a>
bool <a class="el" href="pro_8h.html#a6505e7ff3b129d8b17258304886fd133">idaapi</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbg__funcs__cmds.html#ga0dc2ef1fb91eeffdab5cf938f0d40d1e">request_exit_process</a> (void)</td></tr>
<tr class="memdesc:ga0dc2ef1fb91eeffdab5cf938f0d40d1e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Post an <a class="el" href="group__dbg__funcs__cmds.html#ga2aaee8c71618ffef3f2562599b314316" title="Terminate the debugging of the current process. ">exit_process()</a> request. <br /></td></tr>
<tr class="separator:ga0dc2ef1fb91eeffdab5cf938f0d40d1e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae60f07b4d9ca0f5329c3f64003aedd4d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="pro_8h.html#ab65ed42d67e6c517c746ff2a6a187016">ssize_t</a> <a class="el" href="pro_8h.html#a6505e7ff3b129d8b17258304886fd133">idaapi</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbg__funcs__cmds.html#gae60f07b4d9ca0f5329c3f64003aedd4d">get_processes</a> (<a class="el" href="classqvector.html">procinfo_vec_t</a> *proclist)</td></tr>
<tr class="memdesc:gae60f07b4d9ca0f5329c3f64003aedd4d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Take a snapshot of running processes and return their description.  <a href="#gae60f07b4d9ca0f5329c3f64003aedd4d">More...</a><br /></td></tr>
<tr class="separator:gae60f07b4d9ca0f5329c3f64003aedd4d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga677ee11ddd3ea82cd56acdf04e2fa746"><td class="memItemLeft" align="right" valign="top">int <a class="el" href="pro_8h.html#a6505e7ff3b129d8b17258304886fd133">idaapi</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbg__funcs__cmds.html#ga677ee11ddd3ea82cd56acdf04e2fa746">attach_process</a> (<a class="el" href="idd_8hpp.html#a288e13e815d43b06e75819f8939524df">pid_t</a> pid=<a class="el" href="idd_8hpp.html#a4bb96cbe4ed99a94352b5cb0fc5b660a">NO_PROCESS</a>, int event_id=-1)</td></tr>
<tr class="memdesc:ga677ee11ddd3ea82cd56acdf04e2fa746"><td class="mdescLeft">&#160;</td><td class="mdescRight">Attach the debugger to a running process.  <a href="#ga677ee11ddd3ea82cd56acdf04e2fa746">More...</a><br /></td></tr>
<tr class="separator:ga677ee11ddd3ea82cd56acdf04e2fa746"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga5a43a13fc0e18490d75206f52ed845e9"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga5a43a13fc0e18490d75206f52ed845e9"></a>
int <a class="el" href="pro_8h.html#a6505e7ff3b129d8b17258304886fd133">idaapi</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbg__funcs__cmds.html#ga5a43a13fc0e18490d75206f52ed845e9">request_attach_process</a> (<a class="el" href="idd_8hpp.html#a288e13e815d43b06e75819f8939524df">pid_t</a> pid, int event_id)</td></tr>
<tr class="memdesc:ga5a43a13fc0e18490d75206f52ed845e9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Post an <a class="el" href="group__dbg__funcs__cmds.html#ga677ee11ddd3ea82cd56acdf04e2fa746" title="Attach the debugger to a running process. ">attach_process()</a> request. <br /></td></tr>
<tr class="separator:ga5a43a13fc0e18490d75206f52ed845e9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab2a6e510deb994ccda919f055221afa0"><td class="memItemLeft" align="right" valign="top">bool <a class="el" href="pro_8h.html#a6505e7ff3b129d8b17258304886fd133">idaapi</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbg__funcs__cmds.html#gab2a6e510deb994ccda919f055221afa0">detach_process</a> (void)</td></tr>
<tr class="memdesc:gab2a6e510deb994ccda919f055221afa0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Detach the debugger from the debugged process.  <a href="#gab2a6e510deb994ccda919f055221afa0">More...</a><br /></td></tr>
<tr class="separator:gab2a6e510deb994ccda919f055221afa0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga285d217265524c3b4db214240b2e2b53"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga285d217265524c3b4db214240b2e2b53"></a>
bool <a class="el" href="pro_8h.html#a6505e7ff3b129d8b17258304886fd133">idaapi</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbg__funcs__cmds.html#ga285d217265524c3b4db214240b2e2b53">request_detach_process</a> (void)</td></tr>
<tr class="memdesc:ga285d217265524c3b4db214240b2e2b53"><td class="mdescLeft">&#160;</td><td class="mdescRight">Post a <a class="el" href="group__dbg__funcs__cmds.html#gab2a6e510deb994ccda919f055221afa0" title="Detach the debugger from the debugged process. ">detach_process()</a> request. <br /></td></tr>
<tr class="separator:ga285d217265524c3b4db214240b2e2b53"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaea12da3f16ff0ea60446377cbb21ebb3"><td class="memItemLeft" align="right" valign="top">bool <a class="el" href="pro_8h.html#a6505e7ff3b129d8b17258304886fd133">idaapi</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbg__funcs__cmds.html#gaea12da3f16ff0ea60446377cbb21ebb3">is_debugger_busy</a> (void)</td></tr>
<tr class="memdesc:gaea12da3f16ff0ea60446377cbb21ebb3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Is the debugger busy?.  <a href="#gaea12da3f16ff0ea60446377cbb21ebb3">More...</a><br /></td></tr>
<tr class="separator:gaea12da3f16ff0ea60446377cbb21ebb3"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="ga610fa89b8ec6db08d7f7d3aabcf69a2f"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="pro_8h.html#a6505e7ff3b129d8b17258304886fd133">idaapi</a> get_process_state </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Return the state of the currently debugged process. </p>
<table class="doxtable">
<tr>
<td>Type</td><td>Synchronous function </td></tr>
<tr>
<td>Notification</td><td>none (synchronous function) </td></tr>
</table>
<dl class="section return"><dt>Returns</dt><dd>one of <a class="el" href="group___d_s_t_a_t_e__.html">Debugged process states</a> </dd></dl>

</div>
</div>
<a class="anchor" id="ga626126369d3b58b3d5eeaa953c936988"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="pro_8h.html#a6505e7ff3b129d8b17258304886fd133">idaapi</a> set_process_state </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>newstate</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="idd_8hpp.html#a479b4266d280e0d77b7ca914dec19122">thid_t</a> *&#160;</td>
          <td class="paramname"><em>p_thid</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>dbginv</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Set new state for the debugged process. </p>
<p>Notifies the IDA kernel about the change of the debugged process state. For example, a debugger module could call this function when it knows that the process is suspended for a short period of time. Some IDA API calls can be made only when the process is suspended. The process state is usually restored before returning control to the caller. You must know that it is ok to change the process state, doing it at arbitrary moments may crash the application or IDA. </p><table class="doxtable">
<tr>
<td>Type</td><td>Synchronous function </td></tr>
<tr>
<td>Notification</td><td>none (synchronous function) </td></tr>
</table>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">newstate</td><td>new process state (one of <a class="el" href="group___d_s_t_a_t_e__.html">Debugged process states</a>) if <a class="el" href="group___d_s_t_a_t_e__.html#ga6d31e2cc8725b482c31542d59d679630" title="no process is currently debugged ">DSTATE_NOTASK</a> is passed then the state is not changed </td></tr>
    <tr><td class="paramname">p_thid</td><td>ptr to new thread id. may be NULL or pointer to <a class="el" href="idd_8hpp.html#a3fec2238e4b2b608273f3a6c5f7a31de" title="No thread. ">NO_THREAD</a>. the pointed variable will contain the old thread id upon return </td></tr>
    <tr><td class="paramname">dbginv</td><td><a class="el" href="group___d_b_g_i_n_v__.html">Debugged process invalidation options</a> </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>old debugger state (one of <a class="el" href="group___d_s_t_a_t_e__.html">Debugged process states</a>) </dd></dl>

</div>
</div>
<a class="anchor" id="ga01e494031d20479e64771af94a7f7f61"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="pro_8h.html#a6505e7ff3b129d8b17258304886fd133">idaapi</a> invalidate_dbg_state </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>dbginv</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Invalidate cached debugger information. </p>
<table class="doxtable">
<tr>
<td>Type</td><td>Synchronous function </td></tr>
<tr>
<td>Notification</td><td>none (synchronous function) </td></tr>
</table>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">dbginv</td><td><a class="el" href="group___d_b_g_i_n_v__.html">Debugged process invalidation options</a> </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>current debugger state (one of <a class="el" href="group___d_s_t_a_t_e__.html">Debugged process states</a>) </dd></dl>

</div>
</div>
<a class="anchor" id="gae5e88efeab714519f8424aef6034c50d"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="pro_8h.html#a6505e7ff3b129d8b17258304886fd133">idaapi</a> start_process </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>path</em> = <code>NULL</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>args</em> = <code>NULL</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>sdir</em> = <code>NULL</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Start a process in the debugger. </p>
<table class="doxtable">
<tr>
<td>Type</td><td>Asynchronous function - available as Request </td></tr>
<tr>
<td>Notification</td><td><a class="el" href="dbg_8hpp.html#ac67a564945a2c1721691aa2f657a908ca9c71d0a00c715ba7f5b903c7a25de1eb">dbg_process_start</a> </td></tr>
</table>
<dl class="section note"><dt>Note</dt><dd>You can also use the <a class="el" href="group__dbg__funcs__flow.html#gaf688dcf810c358c63cec805328022113" title="Execute the process until the given address is reached. ">run_to()</a> function to easily start the execution of a process until a given address is reached. </dd>
<dd>
For all parameters, a NULL value indicates the debugger will take the value from the defined Process Options. </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">path</td><td>path to the executable to start </td></tr>
    <tr><td class="paramname">args</td><td>arguments to pass to process </td></tr>
    <tr><td class="paramname">sdir</td><td>starting directory for the process </td></tr>
  </table>
  </dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">-1</td><td>impossible to create the process </td></tr>
    <tr><td class="paramname">0</td><td>the starting of the process was cancelled by the user </td></tr>
    <tr><td class="paramname">1</td><td>the process was properly started </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="gafde4e91a01fb308d4418512ccb369637"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="pro_8h.html#a6505e7ff3b129d8b17258304886fd133">idaapi</a> suspend_process </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Suspend the process in the debugger. </p>
<table class="doxtable">
<tr>
<td>Type</td><td><ul>
<li>Synchronous function (if in a notification handler)</li>
<li>Asynchronous function (everywhere else)</li>
<li>available as Request </li>
</ul>
</td></tr>
<tr>
<td>Notification</td><td><ul>
<li>none (if in a notification handler)</li>
<li><a class="el" href="dbg_8hpp.html#ac67a564945a2c1721691aa2f657a908ca9c3f031bf95ae0fd16786ecaee29d3ad" title="The process is now suspended. ">dbg_suspend_process</a> (everywhere else)  </li>
</ul>
</td></tr>
</table>
<dl class="section note"><dt>Note</dt><dd>The <a class="el" href="group__dbg__funcs__cmds.html#gafde4e91a01fb308d4418512ccb369637" title="Suspend the process in the debugger. ">suspend_process()</a> function can be called from a notification handler to force the stopping of the process. In this case, no notification will be generated. When you suspend a process, the running command is always aborted. </dd></dl>

</div>
</div>
<a class="anchor" id="ga8833a43919fac27965ef862bbc2b5073"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="pro_8h.html#a6505e7ff3b129d8b17258304886fd133">idaapi</a> continue_process </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Continue the execution of the process in the debugger. </p>
<table class="doxtable">
<tr>
<td>Type</td><td>Synchronous function - available as Request </td></tr>
<tr>
<td>Notification</td><td>none (synchronous function) </td></tr>
</table>
<dl class="section note"><dt>Note</dt><dd>The <a class="el" href="group__dbg__funcs__cmds.html#ga8833a43919fac27965ef862bbc2b5073" title="Continue the execution of the process in the debugger. ">continue_process()</a> function can be called from a notification handler to force the continuation of the process. In this case the request queue will not be examined, IDA will simply resume execution. Usually it makes sense to call <a class="el" href="group__dbg__funcs__cmds.html#ga32a8ecb2f27d1ce7a88278cf2aaa5d8f" title="Post a continue_process() request. ">request_continue_process()</a> followed by <a class="el" href="group__dbg__funcs.html#ga7a7be026d9efa51e8a10936c38a1f50f" title="Execute requests until all requests are processed or an asynchronous function is called. ">run_requests()</a>, so that IDA will first start a queued request (if any) and then resume the application. </dd></dl>

</div>
</div>
<a class="anchor" id="ga32a8ecb2f27d1ce7a88278cf2aaa5d8f"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="pro_8h.html#a6505e7ff3b129d8b17258304886fd133">idaapi</a> request_continue_process </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Post a <a class="el" href="group__dbg__funcs__cmds.html#ga8833a43919fac27965ef862bbc2b5073" title="Continue the execution of the process in the debugger. ">continue_process()</a> request. </p>
<dl class="section note"><dt>Note</dt><dd>This requires an explicit call to <a class="el" href="group__dbg__funcs.html#ga7a7be026d9efa51e8a10936c38a1f50f" title="Execute requests until all requests are processed or an asynchronous function is called. ">run_requests()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="ga2aaee8c71618ffef3f2562599b314316"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="pro_8h.html#a6505e7ff3b129d8b17258304886fd133">idaapi</a> exit_process </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Terminate the debugging of the current process. </p>
<table class="doxtable">
<tr>
<td>Type</td><td>Asynchronous function - available as Request </td></tr>
<tr>
<td>Notification</td><td><a class="el" href="dbg_8hpp.html#ac67a564945a2c1721691aa2f657a908ca8636e64919319ca38ff0c12d64b9421c">dbg_process_exit</a> </td></tr>
</table>

</div>
</div>
<a class="anchor" id="gae60f07b4d9ca0f5329c3f64003aedd4d"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="pro_8h.html#ab65ed42d67e6c517c746ff2a6a187016">ssize_t</a> <a class="el" href="pro_8h.html#a6505e7ff3b129d8b17258304886fd133">idaapi</a> get_processes </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classqvector.html">procinfo_vec_t</a> *&#160;</td>
          <td class="paramname"><em>proclist</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Take a snapshot of running processes and return their description. </p>
<table class="doxtable">
<tr>
<td>Type</td><td>Synchronous function </td></tr>
<tr>
<td>Notification</td><td>none (synchronous function) </td></tr>
</table>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">array</td><td>with information about each running process </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>number of processes or -1 on error </dd></dl>

</div>
</div>
<a class="anchor" id="ga677ee11ddd3ea82cd56acdf04e2fa746"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="pro_8h.html#a6505e7ff3b129d8b17258304886fd133">idaapi</a> attach_process </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="idd_8hpp.html#a288e13e815d43b06e75819f8939524df">pid_t</a>&#160;</td>
          <td class="paramname"><em>pid</em> = <code><a class="el" href="idd_8hpp.html#a4bb96cbe4ed99a94352b5cb0fc5b660a">NO_PROCESS</a></code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>event_id</em> = <code>-1</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Attach the debugger to a running process. </p>
<table class="doxtable">
<tr>
<td>Type</td><td>Asynchronous function - available as Request </td></tr>
<tr>
<td>Notification</td><td><a class="el" href="dbg_8hpp.html#ac67a564945a2c1721691aa2f657a908caf603054c6474ef8f7f1e1f722005eb87">dbg_process_attach</a> </td></tr>
</table>
<dl class="section note"><dt>Note</dt><dd>This function shouldn't be called as a request if <a class="el" href="idd_8hpp.html#a4bb96cbe4ed99a94352b5cb0fc5b660a" title="No process. ">NO_PROCESS</a> is used. </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pid</td><td>PID of the process to attach to. If <a class="el" href="idd_8hpp.html#a4bb96cbe4ed99a94352b5cb0fc5b660a" title="No process. ">NO_PROCESS</a>, a dialog box will interactively ask the user for the process to attach to. </td></tr>
  </table>
  </dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">-2</td><td>impossible to find a compatible process </td></tr>
    <tr><td class="paramname">-1</td><td>impossible to attach to the given process (process died, privilege needed, not supported by the debugger plugin, ...) </td></tr>
    <tr><td class="paramname">0</td><td>the user cancelled the attaching to the process </td></tr>
    <tr><td class="paramname">1</td><td>the debugger properly attached to the process </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="gab2a6e510deb994ccda919f055221afa0"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="pro_8h.html#a6505e7ff3b129d8b17258304886fd133">idaapi</a> detach_process </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Detach the debugger from the debugged process. </p>
<table class="doxtable">
<tr>
<td>Type</td><td>Asynchronous function - available as Request </td></tr>
<tr>
<td>Notification</td><td><a class="el" href="dbg_8hpp.html#ac67a564945a2c1721691aa2f657a908ca9953b6587edabb6e6189732186e092aa">dbg_process_detach</a> </td></tr>
</table>

</div>
</div>
<a class="anchor" id="gaea12da3f16ff0ea60446377cbb21ebb3"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="pro_8h.html#a6505e7ff3b129d8b17258304886fd133">idaapi</a> is_debugger_busy </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Is the debugger busy?. </p>
<p>Some debuggers do not accept any commands while the debugged application is running. For such a debugger, it is unsafe to do anything with the database (even simple queries like get_byte may lead to undesired consequences). Returns: true if the debugged application is running under such a debugger </p>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.9.1
</small></address>
</body>
</html>
